---
permalink: "/index.html"
layout: main-layout
---

<div id="sidebar">
  <a class="try" href="online.html">Try Peggy online</a>
  <div class="separator">&mdash; or &mdash;</div>
  <pre class="install">npm install peggy</pre>
  <div class="separator">&mdash; or &mdash;</div>
  <div class="label">Download browser version</div>
  <span id="download">
    <a title="Download a minified version of Peggy for the browser"
      href="https://unpkg.com/peggy@5.0.6/browser/peggy.min.js">minified</a>
  </span>
  <iframe id="discord"
    src="https://discordapp.com/widget?id=985995982909100082&theme=dark"
    width="250" height="250" allowtransparency="true" frameborder="0"
    sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts">
  </iframe>
</div>

<div id="left-column">
  <p>
    Peggy is a simple parser generator for JavaScript that produces fast parsers
    with excellent error reporting. You can use it to process complex data or
    computer languages and build transformers, interpreters, compilers and other
    tools easily.
  </p>

  <h2>Features</h2>

  <ul>
    <li>Simple and expressive grammar syntax</li>
    <li>Integrates both lexical and syntactical analysis</li>
    <li>Parsers have excellent error reporting out of the box</li>
    <li>
      Based on
      <a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar">parsing expression grammar</a>
      formalism &mdash; more powerful than traditional LL(<em>k</em>) and
      LR(<em>k</em>) parsers
    </li>
    <li>
      Usable <a href="online.html">from your browser</a>, from the command line,
      or via JavaScript API
    </li>
    <li>
      <a href="https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map">Source map</a>
      support.
    </li>
  </ul>
</div>
